// 登录接口需要携带的参数类型

export interface loginForm {
    userName: string,
    passWord: string
}

interface dataType {
    token?: string,
    message?: string
}

// 登录接口返回的数据类型
export interface loginResponseData {
    code: number,
    data: dataType
}

//定义服务器返回用户信息相关的数据类型

interface userInfo {
    userId: number,
    avatar: string,
    username: string,
    password: string,
    desc: string,
    roles: string[],
    buttons: string[],
    routes: string[],
    token: string
}

interface user {
    checkUser: userInfo
}
export interface userInfoReponseData {
    code: number,
    data: user
}

//找回密码携带参数
export interface findPasswordReq {
    email: string,
    passWord: string,
    passWord_confirm: string
}

//找回密码返回数据

interface findPassword {
    id: number,
    email: string,
    avatar: string,
    name: string,
    gender: boolean,
    createAt: string,
    updateAt: string
    message: string[]

}
export interface findePasswordRes{
    code: number,
    data: findPassword
}

//邮箱验证码
export interface sendEmail{
    email: string
}
interface captchaType2{
    message: string,
    key : string
}
interface captchaType {
   data : captchaType2
}
export interface sendEmailResponse{
    code: number,
    data: captchaType
}

// 验证邮箱验证码是否正确

interface messageType {
    message: string
}
export interface validateEmailCodeRes{
    code: number
    error: string
    statusCode: number
    data: messageType
    message:string
}

export interface validateEmailCodeReq{
    key:string,
    value: number
}